home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / master.z / master
Encoding:
Text File  |  2002-10-03  |  11.3 KB  |  265 lines

  1.  
  2.  
  3.  
  4. mmmmaaaasssstttteeeerrrr((((4444))))                                                            mmmmaaaasssstttteeeerrrr((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      master - master configuration database
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The _m_a_s_t_e_r configuration database is a collection of files.  Each file
  13.      contains configuration information for a device or module that can be
  14.      included in the system.  A file is named with the module name to which it
  15.      applies.  This collection of files is maintained in a directory called
  16.      /_v_a_r/_s_y_s_g_e_n/_m_a_s_t_e_r._d.  Each individual file has an identical format.  For
  17.      convenience, this collection of files is referred to as the _m_a_s_t_e_r file,
  18.      as though it was a single file.  This allows a reference to the _m_a_s_t_e_r
  19.      file to be understood to mean the _i_n_d_i_v_i_d_u_a_l _f_i_l_e in the _m_a_s_t_e_r._d
  20.      directory that corresponds to the name of a device or module.
  21.  
  22.      The _m_a_s_t_e_r file is used by the _l_b_o_o_t(1M) program to obtain device
  23.      information to generate the device driver and configurable module files.
  24.      _m_a_s_t_e_r consists of two parts; they are separated by a line with a dollar
  25.      sign ($) in column 1.  Part 1 contains device information for both
  26.      hardware and software devices and loadable modules.  Part 2 contains
  27.      parameter declarations.  Any line with an asterisk (*) in column 1 is
  28.      treated as a comment.
  29.  
  30.    PPPPaaaarrrrtttt 1111,,,, DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  31.      Hardware devices, software drivers, and loadable modules are defined with
  32.      a line containing the following information.  Field 1 must begin in the
  33.      leftmost position on the line.  Fields are separated by white space (tab
  34.      or blank).
  35.  
  36.      Field 1:   Element characteristics:
  37.                 oooo   specify only once
  38.                 rrrr   required device
  39.                 bbbb   block device
  40.                 cccc   character device
  41.                 tttt   initialize cdevsw[].d_ttys
  42.                 jjjj   filesystem
  43.                 ssss   software driver
  44.                 ffff   STREAMS driver
  45.                 mmmm   STREAMS module
  46.                 xxxx   not a driver; a loadable module
  47.                 kkkk   kernel module
  48.                 uuuu   a stubs module that is loaded after all other normal
  49.                     modules
  50.                 nnnn   driver is fully semaphored for multi-processor operation;
  51.                     the nnnn and pppp directives are ignored on single-processor
  52.                     systems
  53.                 pppp   driver is not semaphored and should run on only one
  54.                     processor
  55.                 wwww   driver is prepared to perform any cache write back
  56.                     operation required on write data passed via the strategy
  57.                     routine
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmaaaasssstttteeeerrrr((((4444))))                                                            mmmmaaaasssstttteeeerrrr((((4444))))
  71.  
  72.  
  73.  
  74.                 dddd   dynamically loadable kernel module
  75.                 RRRR   auto-registrable dynamically loadable kernel module
  76.                 NNNN   don't allow auto-unload of dynamically loadable kernel
  77.                     module
  78.                 DDDD   load, then unload a dynamically loadable kernel module
  79.                 eeee   ethernet driver
  80.  
  81.      Field 2:   Handler prefix (14 characters maximum).
  82.  
  83.      Field 3:   Software driver external major number; a dash (-) if not a
  84.                 software driver or to be assigned during execution of
  85.                 _l_b_o_o_t(1M).  Multiple major numbers can be specified, separated
  86.                 by commas.
  87.  
  88.      Field 4:   Number of sub-devices per device; a dash (-) if none.
  89.  
  90.      Field 5:   Dependency list (optional); this is a comma-separated list of
  91.                 other drivers or modules that must be present in the
  92.                 configuration if this module is to be included
  93.  
  94.      For each module, two classes of information are required by _l_b_o_o_t(1M):
  95.      external routine references and variable definitions.  Routine lines
  96.      begin with white space and immediately follow the initial module
  97.      specification line.  These lines are free form, thus they can be
  98.      continued arbitrarily between non-blank tokens as long as the first
  99.      character of a line is white space.  Variable definition lines begin
  100.      after a line that contains a $ in column one.  Variable definitions
  101.      follow C language conventions, with slight modifications.
  102.  
  103.    PPPPaaaarrrrtttt 1111,,,, RRRRoooouuuuttttiiiinnnneeee RRRReeeeffffeeeerrrreeeennnncccceeee LLLLiiiinnnneeeessss
  104.      If the IRIX system kernel or other dependent module contains external
  105.      references to a module, but the module is not configured, these external
  106.      references are undefined.  Therefore, the routine reference lines are
  107.      used to provide the information necessary to generate appropriate dummy
  108.      functions at boot time when the driver is not loaded.
  109.  
  110.      Routine references are defined as follows:
  111.  
  112.      Field 1:   Routine name ()
  113.  
  114.      Field 2:   The routine type; one of
  115.                 {{{{}}}}          routine_name(){}
  116.                 {{{{nnnnuuuullllllllddddeeeevvvv}}}}   routine_name(){nulldev();}
  117.                 {{{{nnnnoooossssyyyyssss}}}}     routine_name(){return nosys();}
  118.                 {{{{nnnnooooddddeeeevvvv}}}}     routine_name(){return nodev();}
  119.                 {{{{ffffaaaallllsssseeee}}}}     routine_name(){return 0;}
  120.                 {{{{ttttrrrruuuueeee}}}}      routine_name(){return 1;}
  121.                 {{{{ffffssssnnnnuuuullllllll}}}}    routine_name(){return fsnull();}
  122.                 {{{{ffffssssssssttttrrrraaaayyyy}}}}   routine_name(){return fsstray();}
  123.                 {{{{nnnnooooppppkkkkgggg}}}}     routine_name(){nopkg();}
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. mmmmaaaasssstttteeeerrrr((((4444))))                                                            mmmmaaaasssstttteeeerrrr((((4444))))
  137.  
  138.  
  139.  
  140.                 {{{{nnnnoooorrrreeeeaaaacccchhhh}}}}   routine_name(){noreach();}
  141.  
  142.    PPPPaaaarrrrtttt 2222,,,, VVVVaaaarrrriiiiaaaabbbblllleeeessss
  143.      Variables can be declared and (optionally) statically initialized on
  144.      lines after a line whose first character is a dollar sign ($).  Variable
  145.      definitions follow standard C syntax for global declarations, with the
  146.      following inline substitutions:
  147.  
  148.      ##M   The internal major number assigned to the current module if it is a
  149.            device driver; zero if this module is not a device driver.
  150.  
  151.      ##E   The external major number assigned to the current module; either
  152.            explicitly defined by the current master file entry, or assigned by
  153.            _l_b_o_o_t(1M).
  154.  
  155.      ##C   The number of controllers present; this number is determined
  156.            dynamically by lboot(1M) for hardware devices, or by the number
  157.            provided in the system file for non-hardware drivers or modules.
  158.  
  159.      ##D   The number of devices per controller taken directly from the
  160.            current master file entry.
  161.  
  162. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  163.      A sample _m_a_s_t_e_r file for a shared memory module is named _s_h_m.  The module
  164.      is an optional loadable software module that can only be specified once.
  165.      The module prefix is _s_h_m, and it has no major number associated with it.
  166.      In addition, another module named _i_p_c is necessary for the correct
  167.      operation of this module.
  168.  
  169.           *FLAG PREFIX SOFT #DEV DEPENDENCIES
  170.           ox    shm    -     -    ipc
  171.                          shmsys(){nosys}
  172.                          shmexec(){}
  173.                          shmexit(){}
  174.                          shmfork(){}
  175.                          shmslp(){true}
  176.                          shmtext(){}
  177.           $
  178.           #define SHMMAX 131072
  179.           #define SHMMIN 1
  180.           #define SHMMNI 100
  181.           #define SHMSEG 6
  182.           #define SHMALL 512
  183.  
  184.           struct shmid_ds shmem[SHMMNI];
  185.           struct shminfo shminfo = {
  186.                SHMMAX,
  187.                SHMMIN,
  188.                SHMMNI,
  189.                SHMSEG,
  190.                SHMALL,
  191.           };
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. mmmmaaaasssstttteeeerrrr((((4444))))                                                            mmmmaaaasssstttteeeerrrr((((4444))))
  203.  
  204.  
  205.  
  206.      This _m_a_s_t_e_r file causes routines named _s_h_m_s_y_s, _s_h_m_e_x_e_c, and so on to be
  207.      generated by the boot program if the _s_h_m driver is not loaded and there
  208.      is a reference to this routine from any other module loaded.  When the
  209.      driver is loaded, the structure array _s_h_m_e_m is allocated, and the
  210.      structure _s_h_m_i_n_f_o is allocated and initialized as specified.
  211.  
  212.      A sample _m_a_s_t_e_r file for a VME disk driver is named _d_k_i_p.  The driver is
  213.      a block and a character device, the driver prefix is _d_k_i_p, and the
  214.      external major number is 4.  The VME interrupt priority level and vector
  215.      numbers are declared in the system file /_v_a_r/_s_y_s_g_e_n/_s_y_s_t_e_m (see
  216.      _l_b_o_o_t(1M)).
  217.  
  218.           *FLAG PREFIX SOFT #DEV DEPENDENCIES
  219.           bc    dkip   4    -    io
  220.  
  221.           $$$
  222.           /* disk driver variable tables */
  223.           #include "sys/dvh.h"
  224.           #include "sys/dkipreg.h"
  225.           #include "sys/elog.h"
  226.  
  227.           struct iotime dkipiotime[##C][DKIPUPC]; /* io statistics */
  228.           struct iobuf dkipctab[##C];             /* controller queues */
  229.           struct iobuf dkiputab[##C][DKIPUPC];    /* drive queues */
  230.           int dkipmajor = ##E;                    /* external major # */
  231.  
  232.      This _m_a_s_t_e_r file causes entries in the block and character device switch
  233.      tables to be generated if this module is loaded.  Since this is a
  234.      hardware device (implied by the block and character flags), VME interrupt
  235.      structures are also generated by the boot program.  The declared arrays
  236.      are all sized to the number of controllers present, which is determined
  237.      by the boot program based on information in the system file
  238.      /_v_a_r/_s_y_s_g_e_n/_s_y_s_t_e_m.
  239.  
  240. FFFFIIIILLLLEEEESSSS
  241.      /var/sysgen/master.d/*
  242.      /var/sysgen/system
  243.  
  244. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  245.      lboot(1M), mload(4), system(4).
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.